package com.yonyou.cyxdms.sysAuth.service.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeDeserializer;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeSerializer;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * <p>
 * 账号信息
 * </p>
 *
 * @author quankk
 * @since 2019-03-07
 */

public class UserDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 账号ID
     */
    private Integer userId;
    /**
     *
     */
    private Integer appId;
    private Integer employeeId;
    /**
     * 经销商代码
     */
    private String dealerCode;
    /**
     * 作为登陆的ID
     */
    private String userCode;
    /**
     * 停用，起用
     */
    private Integer userStatus;
    /**
     * 密码
     */
    private String password;
    /**
     * 最后登录时间
     */
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime loginLastTime;
    private String vAddress;
    /**
     */
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime stopDate;
    private Integer organizationId;
    /**
     * 登录失败次数
     */
    private Integer failureNum;
    /**
     * 是否锁定标志
     */
    private Integer lockFlag;

    private String employeeNo;

    private Integer role;



    /**
     * ID
     */
    private String id;
    /**
     * 经销商ID
     */
    private String ndid;
    /**
     * 网络ID
     */
    private String nbid;
    /**
     * 人员代码
     */
    private String vPerson;
    /**
     * 人员名称
     */
    private String vPersonName;
    /**
     * 登录代码
     */
    private String vLogin;
    /**
     * 停用标识
     */
    private Integer cStop;
    /**
     * 停用日期
     */
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime dStop;
    /**
     * 是否登录系统
     */
    private Integer cLogin;
    private String vDealerName;
    /**
     * 登录密码
     */
    private String vPwd;
    /**
     * 性别
     */
    private String vSex;
    /**
     * 工号
     */
    private String vJobNumber;
    /**
     * 身份证号
     */
    private String vIdentityNo;
    /**
     * 手机
     */
    private String vMobile;
    /**
     * 电话
     */
    private String vTel;
    /**
     * 部门ID
     */
    private String nOrgID;
    /**
     * DTMS状态
     */
    private String vDTMSStatus;
    /**
     * P号
     */
    private String vPNo;
    /**
     * 冻结标识
     */
    private Integer vState;
    /**
     * 冻结原因
     */
    private String vFreezeRemark;
    /**
     * 备注
     */
    private String vRemark;
    /**
     * 看板显示名称
     */
    private String vFullSwingName;
    /**
     * 岗位ID
     */
    private String nDuty;
    /**
     * 岗位细分ID
     */
    private String nDutyDetail;
    /**
     * 下发日期
     */
    private String dDownLoad;
    private String vwauVserviceproperty;
    /**
     * 员工分机号
     */
    private Integer nExtnumber;
    /**
     * 邮箱
     */
    private String vEmail;

    /**
     * 主角色代码
     */
    private String roleName;
    /**
     * 主角色名称
     */
    private String description;
    /**
     * 部门名称
     */
    private String vOrgName;

    /**
     * 岗位
     */
    private String vDutyName;

    private String vDutyDetailName;


    private String createBy;
    /**
     * 创建日期
     */

    private LocalDateTime createOn;
    /**
     * 更新者
     */

    private String updateBy;
    /**
     * 更新时间戳
     */

    private Long updateOn;


    private String nCustGroupId;
    private String cMainBranch;
    private String vRoleName;
    private String vRole;


    /**
     *主角色标识
     */
    private String cMain;


    /**
     * 头像路径
     */
    private String vHeadPath;

    /**
     * 微信
     */
    private String vWeChat;

    /**
     * 人员表版本号
     */
    private Integer vUserVersion;

    /*
     * 角色表版本号
     */
    private Integer vRoleVersion;

    /*
     * 人员对应角色表ID
     */

    private String vUserRoleID;

    /**
     *
     * 校验用户是否存在
     */
    private String checkUserExect;

    /**
     *
     * 校验角色是否存在
     */
    private String checkUserRole;

    /**
     *
     * 校验主角色是否存在
     */
    private String checkUserRoleMain;


    /*
     * 校验用户是否被停用
     * */
    private String checkUserCstop;

    private String lockCause;

    public Integer getAppId() {
        return appId;
    }

    public void setAppId(Integer appId) {
        this.appId = appId;
    }

    public String getLockCause() {
        return lockCause;
    }

    public void setLockCause(String lockCause) {
        this.lockCause = lockCause;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNdid() {
        return ndid;
    }

    public void setNdid(String ndid) {
        this.ndid = ndid;
    }

    public String getNbid() {
        return nbid;
    }

    public void setNbid(String nbid) {
        this.nbid = nbid;
    }

    public String getvPerson() {
        return vPerson;
    }

    public void setvPerson(String vPerson) {
        this.vPerson = vPerson;
    }

    public String getvPersonName() {
        return vPersonName;
    }

    public void setvPersonName(String vPersonName) {
        this.vPersonName = vPersonName;
    }

    public String getvLogin() {
        return vLogin;
    }

    public void setvLogin(String vLogin) {
        this.vLogin = vLogin;
    }

    public Integer getcStop() {
        return cStop;
    }

    public void setcStop(Integer cStop) {
        this.cStop = cStop;
    }

    public LocalDateTime getdStop() {
        return dStop;
    }

    public void setdStop(LocalDateTime dStop) {
        this.dStop = dStop;
    }

    public Integer getcLogin() {
        return cLogin;
    }

    public void setcLogin(Integer cLogin) {
        this.cLogin = cLogin;
    }

    public String getvPwd() {
        return vPwd;
    }

    public void setvPwd(String vPwd) {
        this.vPwd = vPwd;
    }

    public String getvSex() {
        return vSex;
    }

    public void setvSex(String vSex) {
        this.vSex = vSex;
    }

    public String getvJobNumber() {
        return vJobNumber;
    }

    public void setvJobNumber(String vJobNumber) {
        this.vJobNumber = vJobNumber;
    }

    public String getvIdentityNo() {
        return vIdentityNo;
    }

    public void setvIdentityNo(String vIdentityNo) {
        this.vIdentityNo = vIdentityNo;
    }

    public String getvMobile() {
        return vMobile;
    }

    public void setvMobile(String vMobile) {
        this.vMobile = vMobile;
    }

    public String getvTel() {
        return vTel;
    }

    public void setvTel(String vTel) {
        this.vTel = vTel;
    }

    public String getnOrgID() {
        return nOrgID;
    }

    public void setnOrgID(String nOrgID) {
        this.nOrgID = nOrgID;
    }

    public String getvDTMSStatus() {
        return vDTMSStatus;
    }

    public void setvDTMSStatus(String vDTMSStatus) {
        this.vDTMSStatus = vDTMSStatus;
    }

    public String getvPNo() {
        return vPNo;
    }

    public void setvPNo(String vPNo) {
        this.vPNo = vPNo;
    }

    public Integer getvState() {
        return vState;
    }

    public void setvState(Integer vState) {
        this.vState = vState;
    }

    public String getvFreezeRemark() {
        return vFreezeRemark;
    }

    public void setvFreezeRemark(String vFreezeRemark) {
        this.vFreezeRemark = vFreezeRemark;
    }

    public String getvRemark() {
        return vRemark;
    }

    public void setvRemark(String vRemark) {
        this.vRemark = vRemark;
    }

    public String getvFullSwingName() {
        return vFullSwingName;
    }

    public void setvFullSwingName(String vFullSwingName) {
        this.vFullSwingName = vFullSwingName;
    }

    public String getnDuty() {
        return nDuty;
    }

    public void setnDuty(String nDuty) {
        this.nDuty = nDuty;
    }

    public String getnDutyDetail() {
        return nDutyDetail;
    }

    public void setnDutyDetail(String nDutyDetail) {
        this.nDutyDetail = nDutyDetail;
    }

    public String getdDownLoad() {
        return dDownLoad;
    }

    public void setdDownLoad(String dDownLoad) {
        this.dDownLoad = dDownLoad;
    }

    public String getVwauVserviceproperty() {
        return vwauVserviceproperty;
    }

    public void setVwauVserviceproperty(String vwauVserviceproperty) {
        this.vwauVserviceproperty = vwauVserviceproperty;
    }

    public Integer getnExtnumber() {
        return nExtnumber;
    }

    public void setnExtnumber(Integer nExtnumber) {
        this.nExtnumber = nExtnumber;
    }

    public String getvEmail() {
        return vEmail;
    }

    public void setvEmail(String vEmail) {
        this.vEmail = vEmail;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getvOrgName() {
        return vOrgName;
    }

    public void setvOrgName(String vOrgName) {
        this.vOrgName = vOrgName;
    }

    public String getvDutyName() {
        return vDutyName;
    }

    public void setvDutyName(String vDutyName) {
        this.vDutyName = vDutyName;
    }

    public String getvDutyDetailName() {
        return vDutyDetailName;
    }

    public void setvDutyDetailName(String vDutyDetailName) {
        this.vDutyDetailName = vDutyDetailName;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public LocalDateTime getCreateOn() {
        return createOn;
    }

    public void setCreateOn(LocalDateTime createOn) {
        this.createOn = createOn;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Long getUpdateOn() {
        return updateOn;
    }

    public void setUpdateOn(Long updateOn) {
        this.updateOn = updateOn;
    }

    public String getnCustGroupId() {
        return nCustGroupId;
    }

    public void setnCustGroupId(String nCustGroupId) {
        this.nCustGroupId = nCustGroupId;
    }

    public String getcMainBranch() {
        return cMainBranch;
    }

    public void setcMainBranch(String cMainBranch) {
        this.cMainBranch = cMainBranch;
    }

    public String getvRoleName() {
        return vRoleName;
    }

    public void setvRoleName(String vRoleName) {
        this.vRoleName = vRoleName;
    }

    public String getvRole() {
        return vRole;
    }

    public void setvRole(String vRole) {
        this.vRole = vRole;
    }

    public String getcMain() {
        return cMain;
    }

    public void setcMain(String cMain) {
        this.cMain = cMain;
    }

    public String getvHeadPath() {
        return vHeadPath;
    }

    public void setvHeadPath(String vHeadPath) {
        this.vHeadPath = vHeadPath;
    }

    public String getvWeChat() {
        return vWeChat;
    }

    public void setvWeChat(String vWeChat) {
        this.vWeChat = vWeChat;
    }

    public Integer getvUserVersion() {
        return vUserVersion;
    }

    public void setvUserVersion(Integer vUserVersion) {
        this.vUserVersion = vUserVersion;
    }

    public Integer getvRoleVersion() {
        return vRoleVersion;
    }

    public void setvRoleVersion(Integer vRoleVersion) {
        this.vRoleVersion = vRoleVersion;
    }

    public String getvUserRoleID() {
        return vUserRoleID;
    }

    public void setvUserRoleID(String vUserRoleID) {
        this.vUserRoleID = vUserRoleID;
    }

    public String getCheckUserExect() {
        return checkUserExect;
    }

    public void setCheckUserExect(String checkUserExect) {
        this.checkUserExect = checkUserExect;
    }

    public String getCheckUserRole() {
        return checkUserRole;
    }

    public void setCheckUserRole(String checkUserRole) {
        this.checkUserRole = checkUserRole;
    }

    public String getCheckUserRoleMain() {
        return checkUserRoleMain;
    }

    public void setCheckUserRoleMain(String checkUserRoleMain) {
        this.checkUserRoleMain = checkUserRoleMain;
    }

    public String getCheckUserCstop() {
        return checkUserCstop;
    }

    public void setCheckUserCstop(String checkUserCstop) {
        this.checkUserCstop = checkUserCstop;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public UserDTO() {
        super();
    }

    public String getEmployeeNo() {
        return employeeNo;
    }

    public void setEmployeeNo(String employeeNo) {
        this.employeeNo = employeeNo;
    }

    public Integer getUserId() {
        return userId;
    }


    public void setUserId(Integer userId) {
        this.userId = userId;
    }


    public Integer getEmployeeId() {
        return employeeId;
    }


    public void setEmployeeId(Integer employeeId) {
        this.employeeId = employeeId;
    }


    public String getDealerCode() {
        return dealerCode;
    }


    public void setDealerCode(String dealerCode) {
        this.dealerCode = dealerCode;
    }


    public String getUserCode() {
        return userCode;
    }


    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }


    public Integer getUserStatus() {
        return userStatus;
    }


    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }


    public String getPassword() {
        return password;
    }


    public void setPassword(String password) {
        this.password = password;
    }


    public LocalDateTime getLoginLastTime() {
        return loginLastTime;
    }


    public void setLoginLastTime(LocalDateTime loginLastTime) {
        this.loginLastTime = loginLastTime;
    }


    public LocalDateTime getStopDate() {
        return stopDate;
    }


    public void setStopDate(LocalDateTime stopDate) {
        this.stopDate = stopDate;
    }


    public Integer getOrganizationId() {
        return organizationId;
    }


    public void setOrganizationId(Integer organizationId) {
        this.organizationId = organizationId;
    }


    public Integer getFailureNum() {
        return failureNum;
    }


    public void setFailureNum(Integer failureNum) {
        this.failureNum = failureNum;
    }


    public Integer getLockFlag() {
        return lockFlag;
    }


    public void setLockFlag(Integer lockFlag) {
        this.lockFlag = lockFlag;
    }

    @Override
    public String toString() {
        return "UserDTO{" +
                "userId=" + userId +
                ", employeeId=" + employeeId +
                ", dealerCode='" + dealerCode + '\'' +
                ", userCode='" + userCode + '\'' +
                ", userStatus=" + userStatus +
                ", password='" + password + '\'' +
                ", loginLastTime=" + loginLastTime +
                ", stopDate=" + stopDate +
                ", organizationId=" + organizationId +
                ", failureNum=" + failureNum +
                ", lockFlag=" + lockFlag +
                ", employeeNo='" + employeeNo + '\'' +
                ", role=" + role +
                '}';
    }

    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param poClass dto 需要转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author quankk
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "userId");
    }

    public String getvAddress() {
        return vAddress;
    }

    public void setvAddress(String vAddress) {
        this.vAddress = vAddress;
    }

    public String getvDealerName() {
        return vDealerName;
    }

    public void setvDealerName(String vDealerName) {
        this.vDealerName = vDealerName;
    }
}
